<% cache_unless page_builder_enabled?, spree_storefront_base_cache_scope.call(section) do %>
  <% separated_vertically = section.preferred_separated == 'vertically' %>

  <div style="<%= section_styles(section) %>">
    <div class="page-container">
      <div class="<%= 'lg:grid lg:grid-cols-12 lg:gap-6' if separated_vertically %>">
        <div class="<%= 'lg:col-span-6' if separated_vertically %>">
          <% section.blocks.includes(:rich_text_text).each do |block| %>
            <h2 class="text-center <%= 'lg:text-left' if separated_vertically %> <%= block.preferred_size == 'small' ? 'text-lg' : (block.preferred_size == 'medium' ? 'text-xl' : 'text-2xl lg:text-3xl') %> font-medium" <%= block_attributes(block) %>>
              <%= block.text %>
            </h2>
          <% end %>
        </div>

        <% if section.video_embed.present? %>
          <div class="<%= 'lg:col-span-5' if separated_vertically %>">
            <div class="mx-auto <%= 'lg:mr-0' if separated_vertically %> rounded-sm overflow-hidden">
              <div class="video-embed-container">
                <%= section.video_embed.raw_html.html_safe %>
              </div>
            </div>
          </div>
        <% end %>
      </div>
    </div>
  </div>
<% end %>
